package com.langerra.shared.channel;

import java.io.Serializable;

public interface ChannelService {

	/**
	 * @return service wide {@code ChannelServicePool}
	 * */
	<T extends Serializable> ChannelServicePool<T> getServicePool();

	/**
	 * @param name
	 *          the channel name
	 * @param persistence
	 *          to back the channel by persistence mechanism
	 * @return a named channel with the specified parameters properties {@code
	 *         Channel}
	 * */
	<T extends Serializable> Channel<T> getChannel(
			String name, boolean persistence);
	
	/**
	 * deletes the named channel namespace and hence all of the messages within
	 * the channel is dropped
	 * 
	 * @param name
	 *          the channel name
	 * 
	 * */
	void deleteChannel(
			String name);
}
